17. Exercise: Notifications
Notifications
INSTRUCTOR NOTE:
- Here's more information on Using Big View Styles
- Another useful style is Big Picture Style Notifications
Notifications
In this exercise you'll create a button that triggers a notification.
Exercise Code
Exercise: T10.02-Exercise-CreateNotification
Notification Exercise
SOLUTION:
- Create a method that makes a `PendingIntent` which will open up the Hydration Reminder app.
- Create a method that returns an appropriately sized icon for your notification.
- Create a method called `remindUserBecauseCharging` that creates a notification telling the user to drink water.
- Add a button which calls the `remindUserBecauseCharging` method.